package com.hanfengyi.feign;

import com.hanfengyi.feign.fallback.FastDFSFignFallBack;
import com.hanfengyi.hrm.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "fastdfs-server",fallbackFactory = FastDFSFignFallBack.class)
public interface FastDFSFignClient {
    @PostMapping("/fastdfs/download")
    byte[] getTemplateFile(@RequestParam("fileUrl") String fileUrl);
    @PostMapping("/fastdfs/uploadByBytes")
    AjaxResult uploadByBytes(@RequestBody byte[] fileBytes, @RequestParam("extName")String extName);
}
